<!DOCTYPE html>
<html>
<head lang="en">
  <meta charset="UTF-8">
  <title></title>
  <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css">
  <link rel="stylesheet" href="index.css">
  <script src="../template.js"></script>
  <script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>
  <script src="http://cdn.bootcss.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container content">
  <a class="title" data-title="Default tooltip">you probably</a>
</div>
<script>
  (function ($) {
    $.fn.tip = function (opt) {
      var tips = "tips";
      var settings = $.extend({}, $.fn.tip.defaults, opt);
      if (settings.onOverOut) {
        var _self = this;
        _self.on("mouseover", function () {
          var toolTip = _self.children("span");
          if (toolTip.size()) {
            toolTip.show();
          } else {
            $("<span>").appendTo(_self).html(_self.attr("data-title")).addClass(tips);
          }
        });
        _self.on("mouseout", function () {
          _self.children("span").hide();
        });
      }
    }
    $.fn.tip.defaults = {
      onOverOut: true
    };
  }(jQuery));


  /**$(".title").on("mouseover",function(){
    var tips = $(this).children("span");
    if(tips.size()){
      tips.removeClass("hidden");
    }else{
      $("<span>").appendTo($(this)).html($(this).attr("data-title")).addClass("tips");
    }
  });

   $(".title").on("mouseout",function(){
    $(this).children("span").addClass("hidden");
  }); **/


</script>
</body>
</html>